<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>v-for遍历对象</title>
</head>
<body>
  <div id="app">
    <!-- 1、在遍历过程中，如果只获取一个值，获取到的是属性的值value: -->
    <ul>
      <li v-for="value in info"> {{value}} </li>
    </ul>

    <!-- 2、遍历过程中,要获取两个值,格式为(value, key), key为对象的属性 -->
    <ul>
      <li v-for="(value, key) in info"> {{key}}: {{value}} </li>
    </ul>

    <!-- 3、(少用)遍历过程中，要获取三个值，格式为(value, key, index), index为索引值 -->
    <ul>
      <li v-for="(value, key, index) in info"> {{index}} {{key}}: {{value}} </li>
    </ul>
  </div>

  <script src="../js/vue.js"></script>
  <script>
    const app = new Vue({
      el: '#app',
      data: {
        message: '你好啊',
        info: {
          name: 'welnee',
          age: '20',
          height: '175'
        }
      },
     
    })
  </script>
</body>
</html>